<% layout('/layout/default.html', {title: '登录', libs: ['layout','validate', 'login'], bodyClass: 'login-page'}){ %>
<% var productName = @Global.getProperty('productName'), productVersion = @Global.getProperty('version'); %>

<div class="lowin">
	<h1><b>${productName}</b> <small>${productVersion}</small></h1>
	<div class="lowin-wrapper">
		<div class="lowin-box lowin-login" >
			<div class="lowin-box-inner">
				<form id="loginForm" action="${ctx}/login" method="post">
					<div class="lowin-group has-feedback">
						<span class="glyphicon glyphicon-user form-control-feedback" title="${i18n('登录账号')}"></span>
						<input type="text" id="username" name="username" value="" autocomplete="username"
							   class="lowin-input required" data-msg-required="${i18n('请填写登录账号.')}"
							   placeholder="${i18n('登录账号')}" />
					</div>
					<div class="lowin-group has-feedback">
                        <span class="glyphicon glyphicon-lock form-control-feedback" title="${i18n('登录密码，鼠标按下显示密码')}"
                              onmousedown="$('#password').attr('type','text')"
                              onmouseup="$('#password').attr('type','password')"></span>
						<input type="password" id="password" name="password" value="" autocomplete="current-password"
							   class="lowin-input required" data-msg-required="${i18n('请填写登录密码.')}"
							   placeholder="${i18n('登录密码')}"  />
					</div>

					<div id="isValidCodeLogin" style="display:${isValidateCodeLogin?'blank':'none'}">
						<#form:validcode name="validateCode" />
					</div>
					<div class="lowin-group">
						<div class="checkbox icheck">
							<label title="${i18n('公共场所慎用,下次不需要再填写帐号')}">
								<input type="checkbox" name="rememberUserCode" data-style="square-blue">&nbsp;${i18n('记住账号')}
							</label>&nbsp;&nbsp;
                            <label title="${i18n('公共场所慎用,下次不需要再填写帐号和密码')}">
                                <input type="checkbox" name="rememberMe" data-style="square-blue">&nbsp;${i18n('记住密码')}
                            </label>
						</div>
					</div>
                    <div class="lowin-group">
                        <button class="lowin-btn login-btn">${i18n('立即登录')}</button>
                    </div>
				</form>
                <div class="row">
                    <div class="col-xs-12">
                        <a href="#" class="pull-left">[ ${i18n('忘记密码')} ]</a>
                        <% if (@com.jsite.common.i18n.I18nLocaleResolver.enabled()){ %>
                        <div class="dropdown pull-right">
                            <a href="javascript:" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">
                                <i class="fa icon-globe"></i> ${@DictUtils.getDictLabel(lang(), 'sys_lang_type', '简体中文')}
                            </a>
                            <ul class="dropdown-menu">
                                <li class="mt5"></li>
                                <% for(var dict in @DictUtils.getDictList('sys_lang_type')){ %>
                                <li><a href="${ctx}/login?lang=${dict.value}">${dict.label}</a></li>
                                <% } %>
                                <li class="mt10"></li>
                            </ul>
                        </div>
                        <% } %>
                    </div>
                </div>
			</div>
            <div class="text-foot">
                &copy; ${@DateUtils.getYear()} ${productName} - Powered By <a href="http://jsite.org.cn">JSite</a>
            </div>
		</div>
	</div>
</div>
<% } %>